<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${ctx}/scripts/jquery-1.4.2.min.js"></script> 
<script type="text/javascript" src="${ctx}/scripts/jquery.pagination.js"></script>
<script   type="text/javascript" >
  
	function getDetail(newsId,div){   
	  $.get("${ctx}/web/Web/showAjaxNews.do", {
	           Action:"get",newsid:newsId}, function (data, textStatus){	 
	                                          
	          var objs = eval("["+data+"]");  
	          
	           if( objs[0].newsimgs != undefined && objs[0].newsimgs != ''){
	          	           var temp_imgs = (objs[0].newsimgs).split(";");
	          	           for( var x = 0 ; x < temp_imgs.length-1; x++){
                                   //   alert('${ctx}'+temp_imgs[x]);
	          	             $("#"+div+"").append('<img style="width:500px; height:700px;margin:0 auto;display:block;" src="${ctx}'+temp_imgs[x]+'"');
	          	           
	          	           }
	           }    
	           
	          $("#"+div+"").append('<p>&nbsp;&nbsp;&nbsp;&nbsp;'+objs[0].newscontent+'</p>');
	         
	       });		
 }
</script>
<title>专题</title>
<link href="${ctx}/css/gr.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="grb_box">
 <c:forEach items="${requestScope.catList}" var="item">
	 <c:if test="${item.caTypes=='IMG'}" > 
	<div class="gr_tupian">
    	<div class="gr_title">${item.names}</div>
		<div class="gr_title2"></div>
        <ul class="ul_tug">
        <c:if test="${item.newsList!=null}">
             <c:forEach items="${item.newsList}" var="temp"> 
        	<li>
        	   <a href="${ctx}/titles/grbdetail.jsp?newsid=${temp.id}"><p class="p_tu"><img width="205" height="211   " src="${ctx}${temp.fromUrl}" /></p>
                    <span>${temp.title}</span></a> 
            </li>
             </c:forEach>
          </c:if>
            <div class="clear"></div>
        </ul>
    </div>
    </c:if>


 <c:if test="${item.caTypes=='IMGX'}" > 
	<div class="gr_tupian">
    	<div class="gr_title">${item.names}</div>
		<div class="gr_title2"></div>
        <ul class="ul_tug">
        <c:if test="${item.newsList!=null}">
             <c:forEach items="${item.newsList}" var="temp"> 
        	<li>
        	   <a href="${ctx}/titles/grbdetail.jsp?newsid=${temp.id}"><p class="p_tu"><img width="109" height="150   " src="${ctx}${temp.fromUrl}" /></p>
                    <span>${temp.title}</span></a> 
            </li>
             </c:forEach>
          </c:if>
            <div class="clear"></div>
        </ul>
    </div>
    </c:if>









    <c:if test="${item.caTypes=='TXT'}" > 
    <div class="gr_tupian">
    	<div class="gr_title">${item.names}</div>
         <div class="gr_title2"></div>
        <c:if test="${item.newsList!=null}">
            <c:forEach items="${item.newsList}" var="temp">
             <div id ="newscontent${temp.id}"  class="nr_wenzi" style="width:774px;color:#000000"> 
      <script   type="text/javascript" >
           getDetail('${temp.id}','newscontent${temp.id}');
      </script>   
            </div> 
             </c:forEach>
          </c:if>
         
    </div>
    </c:if>
 </c:forEach>   
</div>
</body>
</html>
